var i = 0;

            function download() {
                jsProgress.update({
                    maximum: 10,
                    progress: ++i
                });
                if (i < 10) {
                    setTimeout(download, 100 + Math.floor(Math.random() * 100));
                }
            }
            dojo.addOnLoad(function() {
                var contentSlide = dijit.byId("content-slide");
                dijit.byId("slideshow1").set("imageHeight",contentSlide.domNode.clientHeight);
                dijit.byId("slideshow1").set("imageWidth",contentSlide.domNode.clientWidth);

                dojo.connect(window,"onkeydown", function(evt){

                    var slide = dijit.byId("slideshow1");
                    if (evt.keyIdentifier == "Right" && slide.imageIndex < (slide.images.length - 1)) {
                        slide.showImage(slide.imageIndex + 1);
                        return;
                    } else if (evt.keyIdentifier == "Left" && (slide.imageIndex > 0)) {
                        slide.showImage(slide.imageIndex - 1);
                        return;
                    }
                });
                dijit.byId("slideshow1").setDataStore(imageItemStore, { query: {}, count:3, start:0 },
                    {imageThumbAttr: "thumb", imageLargeAttr: "thumb"}
                );
                 var toggled = false;
                dojo.connect(dijit.byId("toggleButton"), "onClick", function() {
                    dijit.byId("toggleButton").attr("iconClass", toggled ? "dijitEditorIcon dijitEditorIconCut" : "dijitEditorIcon dijitEditorIconPaste");
                    toggled = !toggled;
                });
            });